package com.bluegalaxy.sitescore.service;


import com.bluegalaxy.sitescore.entity.Soil;
import com.bluegalaxy.sitescore.entity.TbSoilExposure;

import java.math.BigDecimal;

/**
 * Created by LZRuil on 2017/11/26.
 */
public interface SoilService {
    /**
     * 计算LR
     * @param attractAccess 吸引性/可达性因子值
     * @param areasOfContamination 污染土壤面积因子值
     * @return
     */
     int CaculateLR(int attractAccess, int areasOfContamination);

    /**
     * 计算WC
     * @param hazaQuantityData 废物数量因子值（如何得到？）
     * @param toxicity 毒性因子值
     * @return
     */
    int CaculateWC(int hazaQuantityData, BigDecimal toxicity);

    /**
     * 计算T
     * @param residentIndividual
     * @param pop1
     * @param pop2
     * @param worker
     * @param resources
     * @param terrestrialSensEnvion
     * @return
     */
    int CaculateT(int residentIndividual, int pop1, int pop2, int worker, int resources, int terrestrialSensEnvion);

    /**
     * 计算最终土壤分数
     * @param resident 居住最终分数
     * @param nearby 附近最终分数
     * @return
     */
    BigDecimal CaculateScore(BigDecimal resident, BigDecimal nearby);

    /**
     *计算附近的LR*WC*T
     * @param exposureInt 泄露值
     * @param wcInt WC值
     * @param targets 居住人口T
     * @return
     */
    BigDecimal CaculateResident(int exposureInt, int wcInt, BigDecimal targets);

    /**
     * 计算附近的LR*WC*T
     * @param lrInt 附近人口LR
     * @param wcInt
     * @param targets
     * @return
     */
    BigDecimal CaculateNearby(int lrInt, int wcInt, BigDecimal targets);

    boolean judgeData(TbSoilExposure soil);

}
